set printback=OFF.

TITLE LIS Cross-section Data center in Luxembourg.

TITLE email: usersupport@lisdatacenter.org .

TITLE LIS Self Teaching Package 2022.

TITLE Part I: Inequality, poverty, and social policy.
TITLE SPSS version.

TITLE last change of this version of the syntax: 15-01-2022.


TITLE Exercise 2:	Sample selection and weighting.

get file = gt06h /keep=did dhi hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet.
compute miss_comp = 0.
if (missing(dhi) or missing(hifactor) or missing(hpub_i) or missing(hpub_u) or missing(hpub_a) or missing(hiprivate) or missing(hxitsc)) miss_comp = 1.
frequencies variables =  miss_comp.
descriptives variables = dhi hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt.
frequencies variables = dhi /statistics=median /format=notable.
frequencies variables = grossnet.
compute populat = hpopwgt * nhhmem.
weight by populat.
descriptives variables = dhi hifactor hpub_i hpub_a hiprivate hxitsc hpopwgt.
frequencies variables = dhi /statistics=median /format=notable.
select if miss_comp eq 0.
descriptives variables = dhi hifactor hpub_i hpub_a hiprivate hxitsc hpopwgt.
frequencies variables = dhi /statistics=median /format=notable.

get file = gt06h. 
frequencies variables = currency.
